/*
 * @Description: 动态表单异步获取选项
 * @Version: 0.1
 * @Autor: Civet
 * @Date: 2019-11-04 14:46:11
 * @LastEditors: Civet
 * @LastEditTime: 2019-11-06 15:34:27
 */
import https from "../http";
import qs from "qs";
const WSB_API = process.env.NODE_ENV == "development" ? "/wsbUrl" : `${process.env.JZT_API}`;
const JZT_API = process.env.NODE_ENV == "development" ? "/jztUrl" : `${process.env.JZT_API}`;
const Dyn_API = process.env.NODE_ENV == "development" ? "/dynUrl" : `${process.env.JZT_API}`;

const dynamicFormApi = {
  // 获取目录树
  getDynamicForm: function (url, query) {
    return https({
      //   url: `${WSB_API}${url}`,
      url: `${url}`,
      method: 'get',
      headers: {
        sendKey: "getDynamicForm"
      },
      params: query
    })
  },
  // 模拟
  getDyn: function (query) {
    return https({
      url: `/getDyn`,
      method: 'get',
      headers: {
        sendKey: "getDyn"
      },
      params: query
    })
  }

};



export default dynamicFormApi;
